﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UCenter.Core.Common;

namespace UCenter.ContactFromLiveID
{
    public static class LiveContractCollectionExtension
    {
        public static string ToJson(this LiveContractGroupCollection mc)
        {
            return JsonFormaterUtils.Serialize<LiveContractGroupCollection>(mc);
        }

        public static string ToJson(this LiveContractCollection mc)
        {
            return JsonFormaterUtils.Serialize<LiveContractCollection>(mc);
        }

        public static LiveContractGroupCollection FromJson(this LiveContractGroupCollection mc, string jsonString)
        {
            return JsonFormaterUtils.Deserialize<LiveContractGroupCollection>(jsonString, Encoding.GetEncoding("utf-8"));
        }

        public static LiveContractCollection FromJson(this LiveContractCollection mc, string jsonString)
        {
            return JsonFormaterUtils.Deserialize<LiveContractCollection>(jsonString, Encoding.GetEncoding("utf-8"));
        }
    }
}
